/**
 * @filename:Contract3 2024-01-01 00:00:00
 * @project com/lwl/blue  V1.0
 * Copyright(c) 2024 <a href=mailto:lanwenliang@yidianlife.com>蓝文良</a> Co. Ltd.
 * All right reserved.
 */
package com.lwl.blue.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lwl.blue.commont.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>代码自动生成，请勿修改</p>
 *
 * <p>说明： 采购合同主表实体类</P>
 *
 * @version: V1.0
 * @author: <a href=mailto:lanwenliang@yidianlife.com>蓝文良</a>
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("contract_3")
public class Contract3 extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "contract_inner_id")
    @ApiModelProperty(name = "contractInnerId", value = "采购合同号内码")
    @NotBlank(message = "合同内码不能为空")
    private String contractInnerId;

    @ApiModelProperty(name = "contractNo", value = "合同号")
    @NotBlank(message = "合同号不能为空")
    private String contractNo;

    @ApiModelProperty(name = "contractCancelInnerId", value = "采购合同号核销内码")
    private String contractCancelInnerId;

    @ApiModelProperty(name = "contractCancelNo", value = "采购合同核销号")
    private String contractCancelNo;

    @ApiModelProperty(name = "relatedOrderNo", value = "合同关联订单号")
    @NotBlank(message = "关联订单号不能为空")
    private String relatedOrderNo;

    @ApiModelProperty(name = "externalOrderCancelInnerId", value = "外部采购订单核销内码")
    private String externalOrderCancelInnerId;

    @ApiModelProperty(name = "externalOrderCancelNo", value = "外部采购订单核销外码")
    private String externalOrderCancelNo;

    @ApiModelProperty(name = "externalOrderDetailCancelInnerId", value = "外部采购订单明细核销内码")
    private String externalOrderDetailCancelInnerId;

    @ApiModelProperty(name = "externalOrderDetailCancelNo", value = "外部采购订单明细核销外码")
    private String externalOrderDetailCancelNo;

    @ApiModelProperty(name = "lastBizDocNo", value = "末级业务单据号")
    @NotBlank(message = "末级业务单据号不能为空")
    private String lastBizDocNo;

    @ApiModelProperty(name = "bizDocCode", value = "业务单据编码")
    @NotBlank(message = "业务单据编码不能为空")
    private String bizDocCode;

    @ApiModelProperty(name = "signDate", value = "签约日期")
    @NotNull(message = "签约日期不能为空")
    @JSONField(format = "yyyy-MM-dd")
    private Date signDate;

    @ApiModelProperty(name = "validStartDate", value = "合同有效起始日期")
    @NotNull(message = "有效起始日期不能为空")
    @JSONField(format = "yyyy-MM-dd")
    private Date validStartDate;

    @ApiModelProperty(name = "validEndDate", value = "合同有效结束日期")
    @NotNull(message = "有效结束日期不能为空")
    @JSONField(format = "yyyy-MM-dd")
    private Date validEndDate;

    @ApiModelProperty(name = "signLocation", value = "签约地点")
    private String signLocation;

    @ApiModelProperty(name = "deliveryPlanType", value = "交期计划方式")
    @NotBlank(message = "交期计划方式不能为空")
    private String deliveryPlanType;

    @ApiModelProperty(name = "deliveryTerms", value = "交期条款")
    private String deliveryTerms;

    @ApiModelProperty(name = "expectedDeliveryDate", value = "预计交货日期")
    @NotNull(message = "预计交货日期不能为空")
    @JSONField(format = "yyyy-MM-dd")
    private Date expectedDeliveryDate;

    @ApiModelProperty(name = "pickupPeriodStart", value = "提货期限开始")
    @JSONField(format = "yyyy-MM-dd")
    private Date pickupPeriodStart;

    @ApiModelProperty(name = "pickupPeriodEnd", value = "提货期限结束")
    @JSONField(format = "yyyy-MM-dd")
    private Date pickupPeriodEnd;

    @ApiModelProperty(name = "paymentTermsType", value = "付款期限类型")
    @NotBlank(message = "付款期限类型不能为空")
    private String paymentTermsType;

    @ApiModelProperty(name = "paymentTermsDays", value = "付款期限天数")
    private Integer paymentTermsDays;

    @ApiModelProperty(name = "docVersion", value = "单据版本号")
    @NotBlank(message = "单据版本号不能为空")
    private String docVersion;

    @ApiModelProperty(name = "versionEffectiveTime", value = "本版本生效时间")
    @NotNull(message = "版本生效时间不能为空")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date versionEffectiveTime;

    @ApiModelProperty(name = "originalEffectiveDate", value = "原始版本生效日期")
    @NotNull(message = "原始版本生效日期不能为空")
    @JSONField(format = "yyyy-MM-dd")
    private Date originalEffectiveDate;

    @ApiModelProperty(name = "externalSystemType", value = "外部系统类型")
    private String externalSystemType;

    @ApiModelProperty(name = "externalDocInnerId", value = "外部系统单据内码")
    private String externalDocInnerId;

    @ApiModelProperty(name = "externalDocNo", value = "外部系统单号")
    private String externalDocNo;

    @ApiModelProperty(name = "bizSource", value = "业务来源")
    @NotBlank(message = "业务来源不能为空")
    private String bizSource;

    @ApiModelProperty(name = "bizSourceDesc", value = "业务来源说明")
    private String bizSourceDesc;

    @ApiModelProperty(name = "sourceDocNo", value = "来源单据号")
    private String sourceDocNo;

    @ApiModelProperty(name = "intellectualPropertyClause", value = "知识产权保护条款")
    @NotBlank(message = "知识产权保护条款不能为空")
    private String intellectualPropertyClause;

    @ApiModelProperty(name = "confidentialityClause", value = "保密义务条款")
    @NotBlank(message = "保密义务条款不能为空")
    private String confidentialityClause;

    @ApiModelProperty(name = "liabilityClause", value = "违约责任条款")
    @NotBlank(message = "违约责任条款不能为空")
    private String liabilityClause;

    @ApiModelProperty(name = "otherClauses", value = "其他条款")
    private String otherClauses;

    @ApiModelProperty(name = "quantity", value = "数量")
    @NotNull(message = "数量不能为空")
    private Integer quantity;

    @ApiModelProperty(name = "unit", value = "单位")
    @NotBlank(message = "单位不能为空")
    private String unit;

    @ApiModelProperty(name = "unitPrice", value = "单价")
    @NotNull(message = "单价不能为空")
    private BigDecimal unitPrice;

    @ApiModelProperty(name = "isTempPrice", value = "是否暂定价")
    @NotBlank(message = "是否暂定价不能为空")
    private String isTempPrice;

    @ApiModelProperty(name = "taxFreeUnitPrice", value = "不含税单价")
    @NotNull(message = "不含税单价不能为空")
    private BigDecimal taxFreeUnitPrice;

    @ApiModelProperty(name = "taxFreeAmount", value = "不含税金额")
    @NotNull(message = "不含税金额不能为空")
    private BigDecimal taxFreeAmount;

    @ApiModelProperty(name = "taxRate", value = "增值税税率")
    @NotNull(message = "增值税税率不能为空")
    private BigDecimal taxRate;

    @ApiModelProperty(name = "taxAmount", value = "增值税金额")
    @NotNull(message = "增值税金额不能为空")
    private BigDecimal taxAmount;

    @ApiModelProperty(name = "totalAmount", value = "合同总金额")
    @NotNull(message = "合同总金额不能为空")
    private BigDecimal totalAmount;

    @ApiModelProperty(name = "amountRemark", value = "金额备注")
    private String amountRemark;

    @ApiModelProperty(name = "contractStatus", value = "合同状态")
    @NotNull(message = "合同状态不能为空")
    private Integer contractStatus;

    @ApiModelProperty(name = "redFlag", value = "红冲标记")
    @NotBlank(message = "红冲标记不能为空")
    private String redFlag;

    @ApiModelProperty(name = "creatorId", value = "创建人ID")
    @NotBlank(message = "创建人ID不能为空")
    private String creatorId;

    @ApiModelProperty(name = "updaterId", value = "修改人ID")
    @NotBlank(message = "修改人ID不能为空")
    private String updaterId;

    @ApiModelProperty(name = "attr1", value = "预留属性1")
    @TableField("attr_1")
    private String attr1;

    @ApiModelProperty(name = "attr2", value = "预留属性2")
    @TableField("attr_2")
    private String attr2;

    @ApiModelProperty(name = "attr3", value = "预留属性3")
    @TableField("attr_3")
    private String attr3;

    @ApiModelProperty(name = "attr4", value = "预留属性4")
    @TableField("attr_4")
    private String attr4;

    @ApiModelProperty(name = "attr5", value = "预留属性5")
    @TableField("attr_5")
    private String attr5;

    // 关联查询字段
    @TableField(exist = false)
    @ApiModelProperty(name = "supplierName", value = "供应商名称")
    private String supplierName;

    @TableField(exist = false)
    @ApiModelProperty(name = "supplierId", value = "供应商ID")
    private Integer supplierId;
}
